# 元素数量统计
from collections import Counter


class ElementCounter:
    def __init__(self):
        pass

    def find_most_element(self, elements):
        element_count = Counter(elements)
        most_element = max(element_count, key=element_count.get)
        most_count = element_count[most_element]

        return most_element, most_count


if __name__ == '__main__':
    element_counter = ElementCounter()

    elements = input("请输入一个元素列表，以空格分隔: ").split()
    most_element, most_count = element_counter.find_most_element(elements)

    print("数量最多的元素是: {}".format(most_element))
    print("数量最多的元素个数为: {}".format(most_count))
